package day06;

import java.util.Scanner;

//方法的演示
public class MethodDemo {
    public static void say() {
        System.out.println("你好，我叫小帅，你叫什么");
        System.out.println("大家好，我是好人");
    }

    public static void sayHi(String name, int age) {
        System.out.println("大家好，我叫" + name + "今年" + age + "岁了");

    }

    public static void main(String[] args) {
        SayHello("姜志可",22);
        SayHello("李信",18);
      /*  System.out.println("请输入数组个数：");
        Scanner a1=new Scanner(System.in);
        int aa1= a1.nextInt();
        System.out.println("请输入0到多少：");
        Scanner a2=new Scanner(System.in);
        int aa2=a2.nextInt();

        int []a=testArray(aa1,aa2);
        for(int i=0;i< a.length;i++){
            System.out.println(a[i]);

       */


       // int a=(int)(Math.random()*100);
     //  int b=(int)(Math.random()*100);
       // System.out.println(a+"+"+b+"=");
       // int d=sum(a,b);
      //  System.out.println("总和为："+d);
    //    sa(2.5, "蔡徐坤");
    //    boolean a1 = a1();
    //    System.out.println(a1 && 6 > 89);yi
    }
    //wangjidakale ,678zenmeban wlkkdfaksdf dkfd nfkdfnvkdsfdkf
   // Scanner scan=new Scanner(System.in);


    public static int[] testArray(int a,int b){
        int arr[]=new int[a];
        for(int i=0;i< arr.length;i++){
            arr[i]=(int) (Math.random()*(b+1));
        }
        return arr;
    }
    public static void SayHello(String name,int age) {
        if(age>50){
            return;
        }
        System.out.println("大家好，我叫" + name + ",今年是本命年，快发红包给我");
    }
    //  SayHello("小帅");
    //  sayHi("姜志可",19);
    //  System.out.println("你好，我叫小美");

    public static void sa(double time, String name) {
        System.out.println("大家好，我是练习时长" + time + "year的个人练习生，我叫" + name);


    }
    public static boolean a1() {
        boolean a1 = true;

        return a1;


    }
    public  static  int sum(int sum1,int sum2){
        int sum=sum1+sum2;
        return sum;
     }



}








